/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: CanCfg.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: Can
*
*******************************************************************************/

/** HEADER FILES **/
#include "CanCfg.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
static const CanControllerType CanControllerConfig[CANCTL_ID_CAN_MAX];
const Can_ConfigType Can_Config;


/** LOCAL DATA **/
static const CanControllerType CanControllerConfig[CANCTL_ID_CAN_MAX] = 
{
    /* CANCTL_ID_CAN0 */
    {
        CANCTL_ID_CAN0,
        CAN1_BASE,
        {
            125, /* CanControllerBaudRate: 125k */
            48, /* CanControllerPropSeg */
            CAN_BS1_5TQ, /* CanControllerSeg1 */
            CAN_BS2_2TQ, /* CanControllerSeg2 */
            CAN_SJW_1TQ /* CanControllerSyncJumpWidth */
        }
    }
};

const Can_ConfigType Can_Config = 
{
    {
        0x00
    },
    /* CanConfigSet */
    {
        /* CanHardwareObject CANCTL_ID_CAN0 */
        {
            (CanControllerType*)&CanControllerConfig[CANCTL_ID_CAN0], /* CanControllerRef */
            {
                0x00000000u, /* CanHwFilterMask */
                0x00000000u /* CanHwFilterCode */
            },
            CANID_TYPE_STANDARD
        },
    }
};

